package com.lening.organization.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.common.base.BaseServiceImpl;
import com.lening.organization.dto.RoleMenuDTO;
import com.lening.organization.mapper.PeopleRoleMapper;
import com.lening.organization.mapper.RoleMapper;
import com.lening.organization.dto.RoleDTO;
import com.lening.organization.po.Role;
import com.lening.organization.service.MenuService;
import com.lening.organization.service.RoleService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.awt.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Slf4j
@Service
public class RoleServiceImpl extends BaseServiceImpl<RoleMapper, Role, RoleDTO> implements RoleService {

    @Resource
    private RoleMapper roleMapper;
    @Resource
    private PeopleRoleMapper peopleRoleMapper;

    @Override
    public Page<Role> findRole(Integer pageNum, Integer pageSize, Page<RoleDTO> roleDTO) {
        Page<Role> page = roleMapper.findRole(pageNum, pageSize, roleDTO);
        return page;
    }

    /**
     * 查询全部角色及根据id查询用户的全部角色
     *
     * @param id
     */
    @Override
    public Map<String, Object> findAllRole(Integer id) {
        return null;
    }

    /**
     * 查询所有的菜单数据及查询当前角色的菜单数据
     *
     * @param roleId
     */
    @Override
    public Map<String, Object> findRoleMenuByRoleId(Integer roleId) {
        return null;
    }

    /**
     * 角色添加权限菜单
     *
     * @param roleMenuDTO
     */
    @Override
    public void addRoleMenu(RoleMenuDTO roleMenuDTO) {

    }

}
